package com.recruit.dao;

import com.recruit.entity.User;

import java.sql.SQLException;

public class UpdateUserDao extends BaseDao<User> {

    public int updateUser(User user) throws SQLException {
        String sql = "update user set username = ?,password = ?,email = ?,phone = ?,age = ?,sex = ? where id = ?";
        int index = this.update(sql, user.getUsername(), user.getPassword(), user.getEmail(), user.getPhone(), user.getAge(), user.getSex(), user.getId());
        return index;
    }

}
